package com.bsoft.gol.hcs.specialist.bean.response;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author tongtp
 * @version v0.1
 * @package specialist.bean.response
 * @className PatientSearchProcess
 * @description 患者检索过程实体
 * @create 2021-08-09 10:12
 **/
public class PatientSearchProcess implements Serializable {
	private static final long serialVersionUID = -792384737547395704L;

	/**
	 * source - 住院/门诊，(1门诊/2住院)
	 */
	private Byte source;

	/**
	 * patient_number - 患者号码（门诊即为门诊号码，住院即为住院号码）
	 */
	private String patientNumber;

	/**
	 * patient_id - 病人id，患者在 his 中的唯一标识
	 */
	private String patientId;

	/**
	 * 患者性别
	 */
	private String patientSex;

	/**
	 * 患者名称
	 */
	private String patientName;

	/**
	 * 患者年龄
	 */
	private Integer patientAge;

	/**
	 * 患者电话
	 */
	private String telephone;

	/**
	 * card_type - 患者证件类型(01 二代身份证, 02 居民户口簿,03 护照，04 军官证, 08出生证明, 05 驾驶证，06 港澳居民来往内地通行证,07 台湾居民来往内地通行证,09 港澳居民身份证，10
	 * 港澳居民居住证，99 其他法定有效证件)
	 */
	private String cardType;

	/**
	 * card_number - 患者证件号码
	 */
	private String cardNumber;

	/**
	 * 已入组患者病种信息 通过,拼接
	 */
	private String chronicDiseaseName;
	/**
	 * 已入组患者病种id 通过,拼接
	 */
	private String chronicDiseaseIds;

	/**
	 * 机构ID
	 */
	private String organizationId;

	/**
	 * 机构名称
	 */
	private String organizationName;


	@Override
	public String toString() {
		return "PatientSearchProcess{" +
				"source=" + source +
				", patientNumber='" + patientNumber + '\'' +
				", patientId='" + patientId + '\'' +
				", patientName='" + patientName + '\'' +
				", cardType='" + cardType + '\'' +
				", cardNumber='" + cardNumber + '\'' +
				'}';
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		PatientSearchProcess that = (PatientSearchProcess) o;
		boolean flag1 = false;
		boolean flag2 = false;
		boolean flag3 = false;
		if (source != null && patientNumber != null) {
			flag1 = Objects.equals(source, that.source) && Objects.equals(patientNumber, that.patientNumber);
		}
		if (patientId != null) {
			flag2 = Objects.equals(patientId, that.patientId);
		}
		if (cardType != null && cardNumber != null) {
			flag3 = Objects.equals(cardType, that.cardType) && Objects.equals(cardNumber, that.cardNumber);
		}
		return flag1 || flag2 || flag3;
	}

	@Override
	public int hashCode() {
		if (patientId != null) {
			return Objects.hash(patientId);
		}
		if (cardType != null && cardNumber != null) {
			return Objects.hash(cardType, cardNumber);
		}
		if (source != null && patientNumber != null) {
			return Objects.hash(source, patientNumber);
		}
		return Objects.hash(source, patientNumber, patientId, cardType, cardNumber);
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public Byte getSource() {
		return source;
	}

	public void setSource(Byte source) {
		this.source = source;
	}

	public String getPatientName() {
		return patientName;
	}

	public void setPatientName(String patientName) {
		this.patientName = patientName;
	}

	public String getPatientSex() {
		return patientSex;
	}

	public void setPatientSex(String patientSex) {
		this.patientSex = patientSex;
	}

	public String getPatientNumber() {
		return patientNumber;
	}

	public void setPatientNumber(String patientNumber) {
		this.patientNumber = patientNumber;
	}

	public Integer getPatientAge() {
		return patientAge;
	}

	public void setPatientAge(Integer patientAge) {
		this.patientAge = patientAge;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getPatientId() {
		return patientId;
	}

	public void setPatientId(String patientId) {
		this.patientId = patientId;
	}

	public String getCardType() {
		return cardType;
	}

	public void setCardType(String cardType) {
		this.cardType = cardType;
	}

	public String getCardNumber() {
		return cardNumber;
	}

	public void setCardNumber(String cardNumber) {
		this.cardNumber = cardNumber;
	}

	public String getChronicDiseaseName() {
		return chronicDiseaseName;
	}

	public void setChronicDiseaseName(String chronicDiseaseName) {
		this.chronicDiseaseName = chronicDiseaseName;
	}

	public String getChronicDiseaseIds() {
		return chronicDiseaseIds;
	}

	public void setChronicDiseaseIds(String chronicDiseaseIds) {
		this.chronicDiseaseIds = chronicDiseaseIds;
	}

	public String getOrganizationId() {
		return organizationId;
	}

	public void setOrganizationId(String organizationId) {
		this.organizationId = organizationId;
	}

	public String getOrganizationName() {
		return organizationName;
	}

	public void setOrganizationName(String organizationName) {
		this.organizationName = organizationName;
	}
}
